package com.ruoyi.web.app.user;

import com.ruoyi.common.base.user.vo.AgentAppVO;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.service.IAgentService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 代理信息Controller
 *
 * @author gdk
 * @date 2023-05-27
 */
@RestController
@AllArgsConstructor
@RequestMapping("/app/user/agent")
public class AgentAppController extends BaseController {
    private final IAgentService agentService;

    /**
     * 当前用户的代理信息
     *
     * @return {@link AjaxResult}
     * @author gdk
     * @since 2023/5/27 14:05
     */
    @GetMapping("/current")
    public AjaxResult current() {
        AgentAppVO res = agentService.current();
        return success(res);
    }
}
